<!--{include admin_header}-->
<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

<!--{include admin_breadcrumb}-->
						<div class="nav-search" id="nav-search">
							<form class="form-search" method="get">
<!--{loop $query_string $k $v}-->
<!--{if $k != 'totalsearch'}-->
								<input type="hidden" name="{$k}" value="${htmlspecialchars($v)}" />
<!--{/if}-->
<!--{/loop}-->
								<span class="input-icon">
									<input type="text" name="totalsearch" value="{$totalsearch}" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<i class="icon-search nav-search-icon"></i>
								</span>
							</form>
						</div><!-- #nav-search -->
					</div>

					<div class="page-content">
						<div class="page-header">
							<h1>{$_G['admincp']['actname']}<small><i class="icon-double-angle-right"></i>{$_G['admincp']['optname']}</small></h1>
						</div><!-- /.page-header -->

						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->

                                <div class="clearfix search-buttons">
                                    <div class="pull-left">
                                        <div class="btn-group">
                                            <button data-toggle="dropdown" class="btn btn-info btn-sm dropdown-toggle">
                                                <i class="icon-search"></i> 按照类别查看<span class="icon-caret-down icon-on-right"></span>
                                            </button>
                                            <ul class="dropdown-menu dropdown-info pull-left">
                                                <li><a href="?action=account&operation=index&manage=yes">管理员</a></li>
                                                <li><a href="?action=account&operation=index">普通员工</a></li>
                                            </ul>
										</div>
                                        <div class="btn-group act-list hide">
                                            <button data-toggle="dropdown" class="btn btn-info btn-sm dropdown-toggle">
                                            	操作<span class="icon-caret-down icon-on-right"></span>
                                            </button>
                                            <ul class="dropdown-menu dropdown-info pull-left">
                                                <li><a href="javascript:void(0);" class="send-mails">发送站内邮件</a></li>
                                            </ul>
										</div>
                                        <label class="inline">
                                            <input type="checkbox" ${$sea_high ? 'checked' : ''} id="search-high" class="ace"><span class="lbl"> 高级搜索</span>
                                        </label>
    
                                    </div>
                                    <div class="pull-right">
										<div class="btn-toolbar">
											<div class="btn-group">
												<button data-toggle="dropdown" class="btn btn-info btn-sm dropdown-toggle">
													添加<span class="icon-caret-down icon-on-right"></span>
												</button>

												<ul class="dropdown-menu dropdown-info pull-right">
													<li><a href="?action=account&operation=edit">员工</a></li>
													<li><a href="?action=account&operation=edit_department">部门</a></li>
													<li><a href="?action=account&operation=editgroup">岗位</a></li>

													<li class="divider"></li>
													<li><a href="?action=account&operation=edit_company">公司</a></li>
												</ul>
											</div><!-- /btn-group -->
										</div>
									</div>
								</div>

                                <div class="clearfix -search- ${$sea_high ? '' : 'hide'}">
                                    <div class="hr dotted"></div>
                                    <div class="widget-main">
                                        <form class="form-inline" method="get">
                                        	<input name="sea_high" value="1" type="hidden" />
                                        	<input name="action" value="{$_G['admincp']['action']}" type="hidden" />
                                        	<input name="opeation" value="{$_G['admincp']['operation']}" type="hidden" />
                                            <div class="col-xm-12">
                                                所属公司： <select class="select2" name="company">${option($companys, $sea_company, '选择')}</select>
                                                <div class="visible-xs visible-sm hidden-md hidden-lg space space-2"></div>
                                                所属部门： <select class="select2" name="department">${option($departments, $sea_department, '选择')}</select>
                                                <button type="submit" class="btn btn-purple btn-sm">
                                                    我搜<i class="icon-search icon-on-right bigger-110"></i>
                                                </button>
                                            </div>
                                        </form>
                                    </div>
								</div>

								<div class="hr dotted"></div>

								<div class="row">
									<div class="col-xs-12">
										<div class="table-responsive">
											<table id="sample-table-1" class="table table-striped table-bordered table-hover">
												<thead>
													<tr>
														<th class="center">
															<label>
																<input type="checkbox" class="ace" />
																<span class="lbl"></span>
															</label>
														</th>
														<th>Heivrid</th>
														<th>岗位</th>
														<th>手机</th>
														<th>姓名</th>
														<th>性别</th>
														<th>操作</th>
													</tr>
												</thead>

												<tbody>
					<!--{loop $admins $index $one}-->
													<tr>
														<td class="center">
															<label>
																<input type="checkbox" class="admin-checkbox ace" value="{$one['username']}" /><span class="lbl"></span>
															</label>
														</td>

														<td><img src="${avatar($one['avatar'])}" width="16" height="16" align="middle" /> <a href="?action=account&operation=profile&heivrid={$one['username']}&profile=yes" target="_blank">{$one['username']}</a></td>
														<td><!--{if $admincp->groups[$one['groupid']]['rank'] >= 80}--><i class="icon-group"></i><!--{else}--><i class="icon-user"></i><!--{/if}--> {$companys[$one['companyid']]['name']} - {$departments[$one['departmentid']]['name']} - {$admincp->groups[$one['groupid']]['name']}</td>
														<td><a href="tel:{$one['mobile']}">{$one['mobile']}</a></td>
														<td>{$one['realname']}</td>
														<td>${$one['gender'] ? '男' : '女'}</td>
														<td>
															<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
																<a class="btn btn-xs btn-info" href="?action=account&operation=edit&id={$one['id']}">
																	<i class="icon-edit bigger-120"></i>
																</a>
															</div>

															<div class="visible-xs visible-sm hidden-md hidden-lg">
																<div class="inline position-relative">
																	<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
																		<i class="icon-cog icon-only bigger-110"></i>
																	</button>

																	<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
																		<li>
																			<a href="?action=account&operation=edit&id={$one['id']}" class="tooltip-success" data-rel="tooltip" title="编辑">
																				<span class="green">
																					<i class="icon-edit bigger-120"></i>
																				</span>
																			</a>
																		</li>
																	</ul>
																</div>
															</div>
														</td>
													</tr>
<!--{/loop}-->
												</tbody>
											</table>
											{$pages['pages']}
										</div><!-- /.table-responsive -->
									</div><!-- /span -->
								</div><!-- /row -->
								<div class="hr hr-18 dotted hr-double"></div>
								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div>
		<!-- page specific plugin scripts -->
<!--{include admin_footer}-->
		<link rel="stylesheet" href="/static/ace/assets/css/select2.css" />
		<script src="/static/ace/assets/js/jquery.dataTables.min.js"></script>
		<script src="/static/ace/assets/js/jquery.dataTables.bootstrap.js"></script>
		<script src="/static/ace/assets/js/select2.min.js"></script>
		<!-- inline scripts related to this page -->

		<script type="text/javascript">
			D.Main = {
				checkbox : function(){
					var lists = $('.admin-checkbox:checked');
					if( lists.length > 0 ){
						$('.act-list').removeClass('hide');
					}else{
						$('.act-list').addClass('hide');
					}
				},
				init : function(){
					$('.admin-checkbox').change(function(){
						D.Main.checkbox();
					});
					$('.send-mails').on('click', function(){
						var lists = $('.admin-checkbox:checked');
						var heivrids = [];
						$.each(lists, function(i, n){
							heivrids.push($(this).val());
						});
						window.location.href = '?action=message&operation=index&sendto=' + (heivrids.join(','));
					});
				}
			}
			jQuery(function($) {
				$('.search-buttons a, *[type="submit"]').on('click', function(){
					D.loading.bootbox();
				});
				$('#search-high').on('click', function(){
					$(this).is(':checked') ? $('.-search-').removeClass('hide').hide().slideDown() : $('.-search-').slideUp();
				});
				$(".select2").css('width','150px').select2({allowClear:true}).on('change', function(){
					$(this).closest('form').validate().element($(this));
				});
				$(".select-big").css('width','260px');

				var oTable1 = $('#sample-table-2').dataTable( {
				"aoColumns": [
			      { "bSortable": false },
			      null, null,null, null, null,
				  { "bSortable": false }
				] } );
				
				
				$('table th input:checkbox').on('click' , function(){
					var that = this;
					$(this).closest('table').find('tr > td:first-child input:checkbox').each(function(){
						this.checked = that.checked;
						$(this).closest('tr').toggleClass('selected');
					});
					D.Main.checkbox();
				});
			
			
				$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
				function tooltip_placement(context, source) {
					var $source = $(source);
					var $parent = $source.closest('table')
					var off1 = $parent.offset();
					var w1 = $parent.width();
			
					var off2 = $source.offset();
					var w2 = $source.width();
			
					if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
					return 'left';
				}
			})
		</script>
</body>
</html>